/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.viettel.bkno.visionone.entities;

/**
 *
 * @author hien
 */
public enum ResourceType {
    IMAGE (1), HTML(2), VIDEO(3), WEB(4), UNKNOWN(5);
    int code;

    private ResourceType(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }
    
    public ResourceType getResourceType(int code) {
        switch (code) {
            case 1: return IMAGE;
            case 2: return HTML;
            case 3: return VIDEO;
            case 4: return WEB;
            default: return UNKNOWN;
        }
    }
   
}
